<!DOCTYPE HTML>
<html>
<head>
    {include file="common:meta"}
</head>
<body>

<div class="page-container">
    <div class="float-e-margins">
        <div class="ibox-content">
            <div class="tabs-container">
                <div class="tab-content">
                    <div class="tab-pane active" id="tab-1">
                        <table class="table table-bordered">
                            <thead>
                            <tr>
                                <th>用户ID</th>
                                <th>用户名</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {volist name="data" key='key' id="list"}
                            <tr>
                                <td style="display: none;">{$list['user_id']}</td>
                                <td>{$list['u_id']}</td>
                                <td>{$list['nickname']}</td>
                                <td><button class="user-info btn btn-warning btn-sm" >查看用户信息</button></td>
                                <!--<input type="hidden" class="userId" value="{$list['user_id']}">-->
                            </tr>
                            {/volist}
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="common:footer"}

<script>

    $('.user-info').click(function(){
        var user_id = $(this).parent().siblings('td').eq(0).text();
        //  var id = $(this).parent().siblings('input').val();  //这种方法也是可以的
        //  console.log(id);
        layer.open({
            type: 2,
            title: ['用户信息','font-size:18px;font-family:楷体;font-weight:700;'],
            shadeClose: true,
            shade: false,
            maxmin: true, //开启最大化最小化按钮
            area: ['900px', '600px'],
            content:"/UserInfo?user_id=" +user_id,
            offset:'auto',
            scrollbar:false
        });
    })
</script>
</body>
</html>